"------------
" NerdTree config
"------------
" close nerdtree if there is no file opened
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") &&b:NERDTreeType == "primary") | q | endif

"map <silent> <c-o> :NERDTreeToggle<CR>
"noremap <silent> <c-o> :NERDTreeToggle<CR>
" noremap <silent> <c-o> :NERDTreeToggle<CR> :wincmd k <cr> :TagbarToggle<CR>
" noremap <silent> <c-o> :NERDTreeFocus<CR>
" noremap <silent> <leader>o :NERDTreeFind<cr>
" noremap <silent> <F3> :NERDTreeToggle<cr>
" noremap <silent> <leader><c-o>   : if exists("b:NERDTreeType") | :NERDTreeFocusToggle<CR> | else | :NERDTreeToggle<CR> | endif

let NERDTreeMinimalUI=1
let NERDTreeShowFiles=1
let NERDTreeShowLineNumbers=1
let NERDTreeAutoCenter=1
let NERDChristmasTree=0
let g:NERDTreeWinSize=25
let NERDTreeChDirMode=2
let NERDTreeIgnore=['\~$', '\.pyc$', '\.swp$', '\.o', '\.git', ]
" let NERDTreeSortOrder=['^__\.py$', '\/$', '*', '\.swp$',  '\~$']
let NERDTreeShowBookmarks=0
"let NERDTreeWinPos = "right"		" 设置 NERDTree 子窗口位置
let NERDTreeAutoDeleteBuffer=1		" 删除文件时自动删除文件对应 buffer
let g:nerdtree_tabs_open_on_console_startup=0 " 在终端启动vim时，共享NERDTree
let NERDTreeCaseSensitiveSort=1 " 让文件排列更有序

let g:NERDTreeIndicatorMapCustom = {
    \ "Modified"  : "✹",
    \ "Staged"    : "✚",
    \ "Untracked" : "✭",
    \ "Renamed"   : "➜",
    \ "Unmerged"  : "═",
    \ "Deleted"   : "✖",
    \ "Dirty"     : "✗",
    \ "Clean"     : "✔︎",
    \ "Unknown"   : "?"
    \ }
